package com.skt.service;


import com.skt.domain.DTO.UserQueryDTO;
import com.skt.domain.DTO.request.CreateCategoryRequest;
import com.skt.domain.DTO.request.OrderQueryRequest;
import com.skt.domain.DTO.request.UpdateCategoryRequest;
import com.skt.domain.VO.AdminMerchantApprovalVO;
import com.skt.domain.VO.AdminOrderListVO;
import com.skt.domain.VO.CategoryVO;
import com.skt.domain.VO.UserVO;
import com.skt.result.PageResult;

import javax.validation.Valid;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

public interface AdminService{

    /**
     *审核商家注册申请
     * @param id
     * @return
     */
    AdminMerchantApprovalVO approveMerchant(@Min(value = 1, message = "商家ID必须为正整数") Long id);


    /**
     * 拒绝商家注册申请
     * @param id
     * @param rejectionReason
     * @return
     */
    AdminMerchantApprovalVO rejectMerchant(@Min(value = 1, message = "商家ID必须为正整数") Long id, String rejectionReason);


    /**
     * 查询服装分类列表
     * @param name
     * @param pageNum
     * @param pageSize
     * @return
     */
    PageResult<CategoryVO> listCategories(String name, @Min(value = 1, message = "页码必须大于0") Integer pageNum, @Min(value = 1, message = "每页数量必须大于0") @Max(value = 100, message = "每页数量不能超过100") Integer pageSize);


    /**
     * 新增服装分类
     * @param request
     * @return
     */
    CategoryVO createCategory(@Valid CreateCategoryRequest request);


    /**
     * 更新服装分类
     * @param id
     * @param request
     * @return
     */
    CategoryVO updateCategory(@Min(value = 1, message = "分类ID必须为正整数") Long id, @Valid UpdateCategoryRequest request);


    /**
     * 删除服装分类
     * @param id
     */
    void deleteCategory(@Min(value = 1, message = "分类ID必须为正整数") Long id);


    /**
     * 查看平台用户列表
     * @param queryDTO
     * @return
     */
    PageResult<UserVO> getUserList(@Valid UserQueryDTO queryDTO);


    /**
     * 查看平台订单总览
     * @param request
     * @return
     */
    PageResult<AdminOrderListVO> listOrders(@Valid OrderQueryRequest request);
}